package com.zhangyusheng.easyecharts.component;

import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * TODO: 功能描述
 *
 * @author Michael zhang
 * @email zhangys_0217@sina.com
 * @since 2025年11月11日
 */
@Data
@Accessors(chain = true)
public class DataObj implements Serializable {
    private static final long serialVersionUID = 2L;

    private Double value;

    private LabelRight label;

    public static class Builder{
        private Double value;
        private LabelRight label;

        public Builder value(Double value){
            this.value = value;
            return this;
        }

        public Builder label(LabelRight label){
            this.label = label;
            return this;
        }
        public DataObj build(){
            return new DataObj(this);
        }
    }
    private DataObj(Builder builder){
        this.value = builder.value;
        this.label = builder.label;

    }

}